package com.zhihuishu.micro.course.service;

import com.zhihuishu.micro.course.dto.TreenityDto;

import java.util.List;


/**
 *
 * @author jiangli
 * @since branch req-treenity-3
 */
public interface TreenityBatchService<DTO extends TreenityDto> extends TreenityService<DTO>{
    /**
     * 删多条数据
     *
     */
    void deleteMulti(final List<Integer> dtoIds, final long deleteUserId);

    /**
     * 删多条数据
     *
     * dependency:
     * @see #listDtoIdsByMultiOneToManyKey(List)
     * @see #deleteMulti(List, long)
     */
    void deleteMultiByMultiOneToManyKey(final List<Long> oneToManyKeys, final long deleteUserId);

    /**
     * 排序
     */
    void sort(List<DTO> dtoList, long updateUserId);

    void updateMulti(List<DTO> dtoList, long updateUserId);

    /**
     * 查-dto list
     * dependency:
     * @see #listDtoIdsByMultiOneToManyKey(List<Long>)
     * @see #list(List)
     */
    List<DTO> listByMultiOneToManyKey(List<Long> oneToManyIds);

    /**
     * 查-id list
     *
     * @!!可能有性能瓶颈
     * 查询db次数最多为list.size()次
     *
     * dependency:
     * @see #listDtoIds(long)
     */
    List<Integer> listDtoIdsByMultiOneToManyKey(List<Long> oneToManyIds);
}
